<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>用户管理</title>
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/default.css" />
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/easyui/themes/default/easyui.css" />
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/easyui/themes/icon.css" />
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/common/Date.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/page/user/user.js"></script>
</head>
<body>

<table id="gridUser" >
	<thead>
		<tr>
			<th data-options="field:'userName',width:100">用户名</th>
			<th data-options="field:'state',width:60,formatter:stateColumn" align="center">状态</th>
			<th data-options="field:'createDate',width:135">启用时间</th>
			<th data-options="field:'endDate',width:135">到期时间</th>
			<th data-options="field:'id',width:110,formatter:optColumn" align="center">操作</th>
		</tr>
	</thead>
</table>

<!-- 工具栏-start -->
<div id="tbUser" style="padding:5px;height:auto">
	<div style="margin-bottom:5px">
		<div style="float: left;">
			<a href="javascript:dlgUserOpenAdd();" class="easyui-linkbutton" data-options="iconCls:'icon-add'" plain="true" title="添加"></a>
		</div>
		<div class="datagrid-btn-separator" style="margin-left: 5px;float: left;margin-right: 15px;"></div>
		<input class="easyui-textbox" id="txtSearchUserName" style="width:120px" data-options="prompt:'请输入用户名'" />
		<a href="javascript:searchUser();" class="easyui-linkbutton" data-options="iconCls:'icon-search'" >查询</a>
	</div>
</div>
<!-- 工具栏-end -->

<!-- 编辑用户对话框-start -->
<div id="dlgUser" class="easyui-dialog" title="用户管理" data-options="modal:true,closed:true" style="width:530px;height:420px;padding:5px;">
	<div class="easyui-layout" data-options="fit:true">
		<div data-options="region:'center'" style="padding:10px;">
			<div style="display: none;">
			<input id="txtOpType" name="opType" hidden="hidden" value="add"/>
			<input id="txtUserNameOld" hidden="hidden" />
			</div>
			<form id="frmUser" method="post">
				<table>
	    		<tr>
	    			<td width="100px;" align="right">用户名：</td>
	    			<td>
	    				<input id="txtUserId" type="hidden"  name="id"/>
	    				<input id="txtUserName" class="easyui-textbox" type="text"  name="userName" data-options="required:true,validType:['userNameUnused','userNameValidity']" style="width: 145px;"/>
	    			</td>
	    			<td width="100px;" align="right">姓名：</td>
	    			<td>
	    				<input id="txtNickname" class="easyui-textbox" type="text"  name="nickname" data-options="required:true" style="width: 145px;"/>
	    			</td>
	    		</tr>
	    		<tr>
	    			<td align="right">密码：</td>
	    			<td>
	    				<input id="txtPassword" class="easyui-textbox" type="password"  name="password" data-options="required:true,validType:['length[6,32]']" style="width: 145px;"/>
	    			</td>
	    			<td align="right">确认密码：</td>
	    			<td>
	    				<input id="repassword" class="easyui-textbox" type="password" name="repassword" data-options="required:true,validType:['equalTo[\'#txtPassword\']']" style="width: 145px;"/>
	    			</td>
	    		</tr>
	    		<tr>
	    			<td align="right">启用时间：</td>
	    			<td>
	    				<input id="txtStartDate" class="easyui-datetimebox" type="text"  name="createDate" style="width: 145px;"/>
	    			</td>
	    			<td align="right">到期时间：</td>
	    			<td>
	    				<input id="txtEndDate" class="easyui-datetimebox" type="text" name="endDate" style="width: 145px;"/>
	    			</td>
	    		</tr>
	    		<tr>
	    			<td align="right">角色：</td>
	    			<td colspan="3">
	    				<input type="hidden" id="txtRoleIds" name="roleIds" />
	    				<div id="divRolesCheck" style="width: 380px;max-height: 180px;vertical-align: top;overflow:auto;"></div>
	    			</td>
	    		</tr>
	    		</table>
			</form>
		</div>
		<div data-options="region:'south',border:false" style="text-align:center;padding:5px 0 0;">
			<a class="easyui-linkbutton" data-options="iconCls:'icon-ok'" href="javascript:submitForm();" style="width:80px">确定</a>
			<a class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" href="javascript:dlgUserCancel();" style="width:80px">取消</a>
		</div>
	</div>
</div>

</body>
</html>